package com.di.base.controller;


import com.di.base.service.StorageTccService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * (StorageTbl)表控制层
 *
 * @author makejava
 * @since 2025-07-08 22:46:00
 */
@RestController
@RequestMapping("storage")
@Slf4j
public class StorageTblController {
    /**
     * 服务对象
     */
    @Resource
    private StorageTccService storageTblService;

    @GetMapping("/decrease")
    public void decrease(@RequestParam String productId, @RequestParam Integer count) {
        storageTblService.prepareDecrease(null,productId,count);
        log.info("收到库存扣减请求，productId={}，count={}", productId, count);
    }

}

